<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
  <head>
    <title>首页</title>
  </head>
  <body>
	<section class="content-header">
         <h1>
          	 用户管理
         </h1>
         <ol class="breadcrumb">
           <li><a href="#"><i class="fa fa-dashboard"></i> 用户管理</a></li>
           <li class="active">用户修改</li>
         </ol>
     </section>
     <section class="content">
     	<div class="row">
            <!-- left column -->
            <div class="col-md-12">
              <!-- general form elements -->
              <div class="box box-primary">
              	<div class="box-header with-border">
                  <h3 class="box-title">用户基本信息</h3>
                </div><!-- /.box-header -->
                <form action="/user/userUpdate" role="form" name="userForm" method="post" enctype="multipart/form-data">
	                <input type="hidden" name="flag" value="${flag }">
     				<input type="hidden" name="code" value="${user.code }">
	                <div class="box-body">
	                	<div class="form-group">
			     			<label for="inputName2">账号</label>
					    	<input type="text" name="account" value="${user.account }" class="form-control" id="inputName2" >
			     		</div>
			     		<div class="form-group">
			     			<label for="inputName">姓名</label>
					    	<input type="text" name="name" value="${user.name }" class="form-control" id="inputName">
			     		</div>
			     		<div class="form-group">
			     			<label for="inputSex">性别</label>
					    	<input type="radio" name="sex" <c:if test="${user.sex==1 }">checked='checked'</c:if> value="1">男
					    	<input type="radio" name="sex" <c:if test="${user.sex==0 }">checked='checked'</c:if> value="0">女
			     		</div>
			     		<div class="form-group">
			     			<label for="inputMobile">mobile</label>
					    	<input type="text" name="mobile" value="${user.mobile }" class="form-control" id="inputMobile">
			     		</div>
			     		<div class="form-group">
			     			<label for="inputEmail">email</label>
					    	<input type="text" name="email" value="${user.email }" class="form-control" id="inputEmail">
			     		</div>
			     		<div class="form-group">
			     			<label for="inputHeaderPic">头像</label>
			     			<c:if test="${empty user.headerPic }">
					    		<input type="file" name="headerPicture" class="form-control" id="inputHeaderPic">
			     			</c:if>
			     			<c:if test="${not empty user.headerPic }">
			     				<img src="${DOMAIN_NAME }${user.headerPic }" >
			     				<input type="file" name="headerPicture" class="form-control" id="inputHeaderPic">
			     			</c:if>
			     		</div>
			     		<div class="form-group">
			     			<label for="inputRemark">备注</label>
			     			<textarea class="form-control" name="remark" rows="3" id="inputRemark">${user.remark }</textarea>
			     		</div>
			     		<div class="box-footer">
			     			<button type="submit" class="btn btn-primary">提交</button>
			     		</div>
	                </div>
                </form>
              </div>
            </div>
        </div>
     </section>
  </body>
</html>
